package com.leesche.zcsp.node.web.service.impl;

import java.util.List;

import org.apache.ibatis.executor.ReuseExecutor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.leesche.zcsp.node.web.dao.SysUserRoleDao;
import com.leesche.zcsp.node.web.model.SysUserRole;
import com.leesche.zcsp.node.web.model.SysUserRoleCriteria;
import com.leesche.zcsp.node.web.model.SysUserRoleKey;
import com.leesche.zcsp.node.web.service.SysUserRoleService;
import com.leesche.zcsp.node.web.service.impl.data.read.QuerySysUserRoleCondition;
import com.leesche.zcsp.node.web.service.impl.data.read.SysRoleDto;
import com.leesche.zcsp.node.web.service.impl.data.read.SysUserRoleDto;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Title: SysUserRoleServiceImpl.java
 * @Package com.leesche.zcsp.node.service.impl
 * @Description:()
 * @author dennies yang
 * @date 2016年9月22日 下午4:30:03
 * @version V1.0
 */
@Service
@Transactional
public class SysUserRoleServiceImpl
		extends
		BaseServiceImpl<SysUserRole, SysUserRoleCriteria, SysUserRoleDto, QuerySysUserRoleCondition, SysUserRoleKey>
		implements SysUserRoleService {
	@Autowired
	private SysUserRoleDao sysUserRoleDao;

	@Autowired
	public void setBaseDao(SysUserRoleDao sysUserRoleDao) {
		super.setBaseDao(sysUserRoleDao);
	}

	@Override
	public int setupUserRole(List<SysUserRole> sysUserRoles) {
		// TODO Auto-generated method stub return 0;
		return sysUserRoleDao.insertBatch(sysUserRoles);
	}

	@Override
	public List<SysRoleDto> findUserRoleByUserid(Long userid) {
		// TODO Auto-generated method stub return null;
		return sysUserRoleDao.selectByJoinRole(userid);
	}
}
